-- CALC_BUY_MATERIAL_CHANGE

-- 计算购买消耗
-- @param difference钻石向上取整的差值
return function(difference)
    -- 1钻石可换8000金币
    local GEM_WORTH = 8000;
    -- 取整
    local amount = math.modf(difference * GEM_WORTH / 1000);
    return {{ 2, "money", amount},}
end